home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / MPW IIGS Interfaces / CIIGSIncludes / ADB.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-08-01  |  3.8 KB  |  102 lines  |  [TEXT/MPS ]

  1. /********************************************
  2. ; File: ADB.h
  3. ;
  4. ;
  5. ; Copyright Apple Computer, Inc.1986-90
  6. ; All Rights Reserved
  7. ;
  8. ********************************************/
  9. #ifndef __TYPES__
  10. #include <TYPES.h>
  11. #endif
  12.  
  13. #ifndef __ADB__
  14. #define __ADB__
  15.  
  16.  
  17. /* Error Codes */
  18. #define cmndIncomplete 0x0910  /* Command not completed. */
  19. #define cantSync 0x0911  /* Can't synchronize */
  20. #define adbBusy 0x0982  /* Busy  (command pending) */
  21. #define devNotAtAddr 0x0983  /* Device not present at address */
  22. #define srqListFull 0x0984  /* List full */
  23.  
  24. /* ReadKeyMicroData Codes */
  25. #define readModes 0x000A
  26. #define readConfig 0x000B
  27. #define readADBError 0x000C
  28. #define readVersionNum 0x000D
  29. #define readAvailCharSet 0x000E
  30. #define readAvailLayout 0x000F
  31.  
  32. /* SendInfo Commands */
  33. #define abortKbd 0x0001
  34. #define resetKbd 0x0002
  35. #define flushKbd 0x0003
  36. #define setModes 0x0004  /* 2nd param is pointer to mode byte */
  37. #define clearModes 0x0005  /* 2nd param is pointer to mode Byte */
  38. #define setConfig 0x0006  /* 2nd param is pointer to SetConfigRec */
  39. #define synch 0x0007  /* 2nd param is pointer to SynchRec */
  40. #define writeMicroMem 0x0008  /* 2nd param is pointer to MicroControlMemRec */
  41. #define resetSys 0x0010
  42. #define keyCode 0x0011  /* 2nd param is pointer to key code byte. */
  43. #define resetADB 0x0040
  44. #define transmitADBBytes 0x0047  /* add number of bytes to this  */
  45. #define enableSRQ 0x0050  /* ADB address in low nibble */
  46. #define flushADBDevBuf 0x0060  /* ADB address in low nibble */
  47. #define disableSRQ 0x0070  /* ADB address in low nibble */
  48. #define transmit2ADBBytes 0x0080  /* add ADB address to this */
  49. #define listen 0x0080  /* adbCommand = listen + ( 16 * reg) + (adb address) */
  50. #define talk 0x00C0  /* adbCommand = talk + ( 16 * reg) + (adb address) */
  51.  
  52. /* Other Constants */
  53. #define readMicroMem 0x0009
  54. struct ReadConfigRec {
  55.    Byte rcADBAddr; /* Output Byte: ADB address - keyboard and mouse */
  56.    Byte rcLayoutOrLang; /* Output Byte: Layout / Language */
  57.    Byte rcRepeatDelay; /* Output Byte: Repeat / Delay */
  58. } ;
  59. typedef struct ReadConfigRec ReadConfigRec, *ReadConfigRecPtr;
  60. struct SetConfigRec {
  61.    Byte scADBAddr; /* keyboard and mouse */
  62.    Byte scLayoutOrLang; /*  */
  63.    Byte scRepeatDelay; /*  */
  64. } ;
  65. typedef struct SetConfigRec SetConfigRec, *SetConfigRecPtr;
  66. struct SynchRec {
  67.    Byte synchMode; /*  */
  68.    Byte synchKybdMouseAddr; /*  */
  69.    Byte synchLayoutOrLang; /*  */
  70.    Byte synchRepeatDelay; /*  */
  71. } ;
  72. typedef struct SynchRec SynchRec, *SynchRecPtr;
  73. struct ScaleRec {
  74.    Word xDivide; /*  */
  75.    Word yDivide; /*  */
  76.    Word xOffset; /*  */
  77.    Word yOffset; /*  */
  78.    Word xMultiply; /*  */
  79.    Word yMultiply; /*  */
  80. } ;
  81. typedef struct ScaleRec ScaleRec, *ScaleRecPtr;
  82. extern pascal void AbsOff() inline(0x1009,dispatcher);
  83. extern pascal void AbsOn() inline(0x0F09,dispatcher);
  84. extern pascal void ADBBootInit() inline(0x0109,dispatcher);
  85. extern pascal void ADBReset() inline(0x0509,dispatcher);
  86. extern pascal void ADBShutDown() inline(0x0309,dispatcher);
  87. extern pascal void ADBStartUp() inline(0x0209,dispatcher);
  88. extern pascal Boolean ADBStatus() inline(0x0609,dispatcher);
  89. extern pascal Word ADBVersion() inline(0x0409,dispatcher);
  90. extern pascal void AsyncADBReceive() inline(0x0D09,dispatcher);
  91. extern pascal void ClearSRQTable() inline(0x1609,dispatcher);
  92. extern pascal void GetAbsScale() inline(0x1309,dispatcher);
  93. extern pascal Word ReadAbs() inline(0x1109,dispatcher);
  94. extern pascal void ReadKeyMicroData() inline(0x0A09,dispatcher);
  95. extern pascal void ReadKeyMicroMemory() inline(0x0B09,dispatcher);
  96. extern pascal void SendInfo() inline(0x0909,dispatcher);
  97. extern pascal void SetAbsScale() inline(0x1209,dispatcher);
  98. extern pascal void SRQPoll() inline(0x1409,dispatcher);
  99. extern pascal void SRQRemove() inline(0x1509,dispatcher);
  100. extern pascal void SyncADBReceive() inline(0x0E09,dispatcher);
  101. #endif
  102.